import java.awt.image.BufferedImage;

public class NormalBullet extends Bullet{
    //属性
    private static BufferedImage bulletimg = PlayPanel.readImage("img/bullet.png");


    //构造器
    public NormalBullet(int x, int y, int attack, boolean reverse) {
        super(x,y,attack,reverse,2,8,14);
    }

    public NormalBullet(int x, int y, int attack, boolean reverse,int speed) {
        super(x,y,attack,reverse,speed,8,14);
    }


    //方法
    @Override
    public void Move(){
        if (!getReverse()){
            if (PlayPanel.getTime()%getSpeed() == 0){
                setY(getY()-1);
            }
        }else{
            if (PlayPanel.getTime()%getSpeed() == 0){
                setY(getY()+1);
            }
        }
    }

    public BufferedImage getImage(){
        return bulletimg;
    }
    
}
